﻿using Script.UI;
using Script.UI.Component;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System;
using MTUnity.Utils;

public class UI_Histogram_EnergyConsumption : UI_Histogram<HistogramData_EnergyConsumption>
{
    public HistogramDisplay Histogram_DisplayInterface;
    public Text Txt_EnergyConsumption;
    public Text Txt_Time;

    // Start is called before the first frame update


    protected override void OnRefresh()
    {
        DateTime dt = TimeUtil.FromTimestamp(Data.Timestamp);
        Txt_Time.text = dt.Hour.ToString();
        Txt_EnergyConsumption.text = ((int)Data.Current).ToString();

        Histogram_DisplayInterface.SpecificMaxValue = (float)Data.Max;
        Histogram_DisplayInterface.SpecificMinValue = (float)Data.Min;
        Histogram_DisplayInterface.CurrentValue = (float)Data.Current;
    }
}
